#include <unistd.h>
#include <sys/stat.h>
#include <stdio.h>

int main()
{
  struct stat sta;
  stat("./1.txt",&sta);
  printf("size is%d\n",S_ISDIR(sta.st_mode));
  printf("size is%d\n",S_ISREG(sta.st_mode));
  return 0;
}
